package com.xcity.game.arena.online.model;

import naga.x.game.time.TimeUpdater;
import naga.x.util.TimeUtils;

public class Schedule {

	private long beginTime, endTime;
	
	public Schedule(long beginTime, long endTime) {
		this.beginTime = beginTime;
		this.endTime = endTime;
	}
	
	public boolean enable() {
		long now = TimeUpdater.getInstance().now();
		return now >= beginTime && now <= endTime;
	}

	@Override
	public String toString() {
		return TimeUtils.format(beginTime) + "~" + TimeUtils.format(endTime);
	}
	
}
